Skip to content

IBX-4929: Fix property-read usage - #373

Closed
adriendupuis wants to merge 10 commits into
4.6from
fix-property-doc-tags
Closed

adriendupuis wants to merge 10 commits into
4.6from
fix-property-doc-tags

Conversation

@adriendupuis

@adriendupuis adriendupuis commented May 17, 2024 •

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-4929

@property* tags are used for magic properties.
https://docs.phpdoc.org/guide/references/phpdoc/tags/property.html

@property* tags duplicate property definitions in the output documentation when used to re-declare real properties.

This is due (or partially due) to a "bug" in phpDocumentor.

  1. A property is duplicated when both declared as protected and declared as "magically" publicly readable thank to __get. For example, URLAlias have two $alwaysAvailable properties:
    • one is "magic" and read-only,
    • one is "real" and protected.
  2. A property is duplicated when inheriting a magic property and trying to override it. For example, RoleDraft has two $policies properties:
    • one is typed PolicyDraft which is correct.
    • one is typed Policy, inherited from Role, which should have been overridden, and shouldn't appear.

@Property* tags are used for magic properties.
https://docs.phpdoc.org/guide/references/phpdoc/tags/property.html

@Property* tags duplicate property definitions in the output documentation when used to re-declare real properties.
@Property* tags are used for magic properties.
https://docs.phpdoc.org/guide/references/phpdoc/tags/property.html

@Property* tags duplicate property definitions in the output documentation when used to re-declare real properties.
@Property* tags are used for magic properties.
https://docs.phpdoc.org/guide/references/phpdoc/tags/property.html

@Property* tags duplicate property definitions in the output documentation when used to re-declare real properties.
@Property* tags are used for magic properties.
https://docs.phpdoc.org/guide/references/phpdoc/tags/property.html

@Property* tags duplicate property definitions in the output documentation when used to re-declare real properties.
composer install;
/opt/homebrew/Cellar/php@8.1/8.1.28/bin/php -d memory_limit=-1 vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots;
@adriendupuis adriendupuis changed the title Fix property-read usage IBX-4929: Fix property-read usage May 21, 2024
Reorder declarations to avoid new lines from php-cs-fixer
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@adamwojs

Copy link
Copy Markdown
Member

@adriendupuis rebase is needed here

@adriendupuis

Copy link
Copy Markdown
Contributor Author

Fixed on phpDocumentor side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants